Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept localtime xor utc #2720

Merged
merged 1 commit into from
Dec 10, 2019

Conversation

ganmacs
Copy link
Member

@ganmacs ganmacs commented Dec 10, 2019

Which issue(s) this PR fixes:
None

What this PR does / why we need it:

I think localtime = true && utc =false and locatime= false && utc = true should be valid.

In the current implementation, stdout format plugin raises the error like below with utc true in format section.

2019-12-10 15:06:02 +0900 [error]: config error file="example/debug/nginx.conf" error_class=Fluent::ConfigError error="both of utc and localtime are specified, use only one of them"

example conf

<match *>
  @type stdout

  <format>
    @type stdout
    utc true
  </format>
</match>

This is because of calling TimeParameters#configure twice.
but it seems to be inevitable since the stdout format plugin has sub_formater object internally.

Docs Changes:

No need

Release Note:

same as the title

Signed-off-by: Yuta Iwama <[email protected]>
@ganmacs ganmacs requested a review from repeatedly December 10, 2019 06:19
@repeatedly repeatedly merged commit 5165986 into fluent:master Dec 10, 2019
@repeatedly
Copy link
Member

Looks good.

@ganmacs ganmacs deleted the utc-xor-localtime-is-valid branch December 11, 2019 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants